﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="BitPortal.Admin.Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        var loadPage = function (tabPanel, node) {
            var tab = tabPanel.getItem(node.id);

            if (!tab) {
                tab = tabPanel.add({
                    id: node.id,
                    title: node.text,
                    closable: true,
                    autoLoad: {
                        showMask: true,
                        url: node.attributes.href,
                        mode: "iframe",
                        maskMsg: "Loading " + node.attributes.href + "..."
                    },
                    listeners: {
                        update: {
                            fn: function (tab, cfg) {
                                cfg.iframe.setHeight(cfg.iframe.getSize().height - 20);
                            },
                            scope: this,
                            single: true
                        }
                    }
                });
            }

            tabPanel.setActiveTab(tab);
        }
    </script>
    <style type="text/css">
        #header
        {
            background: #7F99BE url(/images/layout-browser-hd-bg.gif) repeat-x scroll center center;
            border: solid 1px #122A59;
        }
        #header a
        {
            color: #F74E1B;
            text-decoration: none;
        }
        #header a:hover
        {
            text-decoration: underline;
        }
        .api-title
        {
            color: #fff;
            font-size: 16px;
            font-weight: normal;
            padding: 5px 10px;
            float: left;
        }
        .right
        {
            float: right;
            color: #fff;
            font-size: 16px;
            font-weight: normal;
            padding: 5px 10px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ext:ResourceManager ID="ResourceManager1" runat="server">
        </ext:ResourceManager>
        <ext:Viewport ID="Viewport1" runat="server" Layout="border">
            <Items>
                <ext:Panel runat="server" Collapsible="True" Region="North" Split="True" Title="North"
                    Border="false" Header="false">
                    <Content>
                        <div id='header' style='height: 32px;'>
                            <div class='api-title'>
                                BitPortal Content Management (Version 1.1)</div>
                            <div class="right">
                                <p>
                                    Xin chào <a href="#"><%=Membership.GetUser().UserName %></a> [<a href="/Logout.aspx">Thoát</a>]</p>
                            </div>
                        </div>
                    </Content>
                </ext:Panel>
                <ext:Panel runat="server" Collapsible="true" Layout="Fit" Region="East" Split="true"
                    Title="East" Width="175" Hidden="true">
                    <Items>
                        <ext:TabPanel runat="server" ActiveTabIndex="0" Border="false" TabPosition="Bottom"
                            Title="Title">
                            <Items>
                                <ext:Panel runat="server" Title="Tab 1">
                                    <Items>
                                    </Items>
                                </ext:Panel>
                                <ext:Panel runat="server" Title="Tab 2">
                                    <Items>
                                    </Items>
                                </ext:Panel>
                            </Items>
                        </ext:TabPanel>
                    </Items>
                </ext:Panel>
                <ext:Panel runat="server" Collapsible="true" Height="100" Region="South" Split="true"
                    Title="South" Hidden="true">
                    <Items>
                    </Items>
                </ext:Panel>
                <ext:Panel runat="server" Collapsible="true" Layout="accordion" Region="West" Split="true"
                    Title="Menu chức năng" Width="175">
                    <Items>
                        <ext:TreePanel ID="TreePanel1" runat="server" Width="300" Title="BitPortal" Icon="ChartOrganisation"
                            RootVisible="false" AutoScroll="true" Border="false">
                            <Listeners>
                                <Click Handler="if (node.attributes.href) { e.stopEvent(); loadPage(#{Pages}, node); }" />
                            </Listeners>
                        </ext:TreePanel>
                    </Items>
                </ext:Panel>
                <ext:Panel runat="server" Layout="Fit" Region="Center" Title="Center" Header="false"
                    Border="false">
                    <Items>
                        <ext:TabPanel ID="Pages" runat="server" EnableTabScroll="true">
                            <Plugins>
                                <ext:TabCloseMenu runat="server">
                                </ext:TabCloseMenu>
                            </Plugins>
                        </ext:TabPanel>
                    </Items>
                </ext:Panel>
            </Items>
        </ext:Viewport>
    </div>
    </form>
</body>
</html>
